package com.csweimei.rentmanagementtreasure.http.entity;

import com.csweimei.rentmanagementtreasure.utils.ValidateUtils;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;

public class StaffListBean extends BaseResult{
    @SerializedName("data")
    private List<DataDTO> data;

    public List<DataDTO> getData() {
        return data;
    }

    public void setData(List<DataDTO> data) {
        this.data = data;
    }

    public static class DataDTO implements Serializable {
        @SerializedName("userid")
        private int userid;
        @SerializedName("Avatar")
        private String avatar;
        @SerializedName("name")
        private String name;
        @SerializedName("sex")
        private String sex;
        @SerializedName("phone")
        private String phone;
        @SerializedName("dealCount")
        private int dealCount;
        @SerializedName("joinTime")
        private String joinTime;

        public int getUserid() {
            return userid;
        }

        public void setUserid(int userid) {
            this.userid = userid;
        }

        public String getAvatar() {
            return avatar;
        }

        public void setAvatar(String avatar) {
            this.avatar = avatar;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getSex() {
            return sex;
        }

        public void setSex(String sex) {
            this.sex = sex;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getDealCount() {
            return dealCount+"";
        }

        public void setDealCount(int dealCount) {
            this.dealCount = dealCount;
        }

        public String getJoinTime() {
            if (joinTime.contains("T")){
                return ValidateUtils.getTimeByType(joinTime,ValidateUtils.TIME_YMD)+" 加入";
            }else {
                return joinTime+" 加入";

            }
        }

        public void setJoinTime(String joinTime) {
            this.joinTime = joinTime;
        }
    }
}
